import { registerMicroApps, start } from 'qiankun';
import type { RegistrableApp } from 'qiankun';

const theme = {
  primary: '#1890ff',
  success: '#52c41a',
  warning: '#faad14',
  error: '#f5222d'
};

const apps: RegistrableApp[] = [
  {
    name: 'react-app',
    entry: '//localhost:3001',
    container: '#react-app',
    activeRule: '/react'
  },
  {
    name: 'vue-app',
    entry: '//localhost:3002',
    container: '#vue-app',
    activeRule: '/vue'
  }
];

registerMicroApps(apps);
start();

const App = () => {
  return (
    <div style={{ backgroundColor: theme.primary }}>
      <div id="react-app" />
      <div id="vue-app" />
    </div>
  );
};

export default App; 